package com.zte.cl.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.zte.cl.model.UserInfo;

@Repository
public interface UserInfoRepository extends JpaRepository<UserInfo, Integer> {

	List<UserInfo> findByCompanyid(String companyId);

	List<UserInfo> findByCompanyidIn(List<String> companyIdList);
	
	@Query("select u.pid from UserInfo u where u.companyid = ?1")
	String[] findPidByCompanyid(String companyId);
}
